
// 西药 接口相关的函数
import request from "../../untils/request.js"

/**
 * 
 *  post
 *  
 */
// 西药库盘点-草稿录入
export const pdsk = (data) => {
    return request.post("/outpatient/sk", data)
}
// 西药房盘点-草稿录入
export const WesternPdsk = (data) => {
    return request.post("/outpatient/phar", data)
}

// 新增西药品调拨
export const Adddpurcallocate = (data) => {
    return request.post("/outpatient/dpurcallocate", data)
}
// 西药品调拨单-修改
export const editdpurcallocate = (data) => {
    return request.put("/outpatient/dpurcallocate", data)
}
// 新增西药库存盘点
export const skInsert = (data) => {
    return request.post("/outpatient/sk/insert", data)
}

// 西药调拨单 = > 快速调拨
export const fastTransfer = (data) => {
    return request.post("/outpatient/dpurcallocate/fastTransfer", data)
}
/**
 * 
 * get 
 *  
 */

// 西药库盘点-提交-审核
export const skCheck = (params) => {
    return request.get("/outpatient/sk/check", { params })
}

// 西药房盘点-提交-审核
export const pharskCheck = (params) => {
    return request.get("/outpatient/phar/check", { params })
}

// 西药库盘点列表-分页
export const skPage = (params) => {
    return request.get("/outpatient/sk/page", { params })
}
// 西药房盘点列表-分页
export const pharPage = (params) => {
    return request.get("/outpatient/phar/page", { params })
}
// 西药库盘点点击查看或者草稿操作
export const getSkVo = (params) => {
    return request.get("/outpatient/sk/getSkVo", { params })
}
// 西药房盘点点击查看或者草稿操作
export const getDrugSkVo = (params) => {
    return request.get("/outpatient/phar/getDrugSkVo", { params })
}



// 西药品调拨单-分页
export const dpurcallocatePage = (params) => {
    return request.get("/outpatient/dpurcallocate/page", { params })
}
// 西药品调拨单-信息
export const getdpurcallocate = (params) => {
    return request.get("/outpatient/dpurcallocate/get", { params })
}
// 西药品调拨单_修改状态状态
export const changedpurcallocate = (params) => {
    return request.get("/outpatient/dpurcallocate/change", { params })
}

// 西药调拨单 = > 加入
export const dpurcallocateJoin = (params) => {
    return request.get("/outpatient/dpurcallocate/join", {params})
}


/**
 * 
 * DELETE 
 *  
 */

// 西药品调拨单_作废
export const Canceldpurcallocate = (params) => {
    return request.delete("/outpatient/dpurcallocate/cancel", { params })
}
// 西药库盘点_删除
export const deleteSk = (params) => {
    return request.get("/outpatient/sk/deleteSk", { params })
}

/*
	Others
*/

// 获取厂家信息
export const getManufacturer = (params) => {
    return request.get("/outpatient/getManufacturer", { params })
}
// 供应商下拉列表
export const selectDropDownList = (params) => {
    return request.get("/outpatient/selectDropDownList", { params })
}
// 获取药品加成率 => 西药
export const getDocMark = (params) => {
    return request.get("/outpatient/docMark/page", { params })
}
// 西药库存列表
export const PurctcmtableList = (params) => {
    return request.get("/outpatient/dpurcallocate/list", { params })
}
// 西药退库详情页
export const getRetnList = (params) => {
    return request.get("/outpatient/purcRetn/getRetnList", {params})
}
// 查询所有科室列表
export const findAttribute = (params) => {
    return request.get("/outpatient/findAttribute", {params})
}
// Excel导入接口
export const importExcel = (formData) => {
    return request.post("/outpatient/import", formData, {
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        transformRequest: [data => data] // 禁用axios的默认转换
    })
}
// 暴露
export default{
	// 西药采购计划
	
	// 西药采购入库
	
	// 西药采购退库
	
	// 西药库存列表
	PurctcmtableList,
	
	// 西药药品调拨
	Adddpurcallocate,editdpurcallocate,changedpurcallocate,
	dpurcallocatePage,Canceldpurcallocate,getdpurcallocate,dpurcallocateJoin,fastTransfer,
	// 西药库盘点
	skInsert,getSkVo,skPage,pdsk,skCheck,deleteSk,
	// 西药房盘点
	pharPage,getDrugSkVo,WesternPdsk,pharskCheck,
	// others
	getManufacturer,getDocMark,findAttribute,
	selectDropDownList,importExcel
}